﻿<UserControl x:Class="ImageTagEditor.PowerToolTip"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 Height="Auto" 
			 Width="Auto"
			 x:Name="powerToolTip">
	
	<UserControl.Resources>
		<SolidColorBrush x:Key="errorColor">Red</SolidColorBrush>
		<SolidColorBrush x:Key="okayColor">LightBlue</SolidColorBrush>
		<SolidColorBrush x:Key="headerOkayFontColor">Black</SolidColorBrush>
		<SolidColorBrush x:Key="headerErrorFontColor">White</SolidColorBrush>
	</UserControl.Resources>
	<StackPanel>
		<Border BorderBrush="Black"
				BorderThickness="0,0,0,2">
			<TextBlock x:Name="headerTextBlock"
					   Background="{StaticResource okayColor}"
					   Foreground="{StaticResource headerOkayFontColor}"
					   FontWeight="Bold"
					   Padding="2,5,0,0"
					   TextWrapping="WrapWithOverflow"
					   Text="{Binding ElementName=powerToolTip, Path=Header}"/>
		</Border>
		
		
		<ContentControl Content="{Binding ElementName=powerToolTip, Path=Description}" />

		<Border x:Name="shortcutBorder"
				BorderBrush="LightBlue"
				BorderThickness="0,2,0,0"
				Margin="0,2,0,0"
				Visibility="{Binding ElementName=powerToolTip, Path=ShortcutVisiblity}">
			 <TextBlock Text="{Binding ElementName=powerToolTip, Path=Shortcut}"/>
		</Border>


		<TextBlock x:Name="errorTextBlock" 
				   Background="{StaticResource errorColor}"
				   Foreground="White"
				   Visibility="Collapsed"
				   Padding="2,5,0,0"
				   TextWrapping="WrapWithOverflow"
				   Text="{Binding ElementName=powerToolTip, Path=Error}">
		</TextBlock>
			
	</StackPanel>
</UserControl>
